﻿/*
   Copyright 2011 Softisis

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

namespace FOM.Interfaces
{
    /// <summary>
    /// Interface for 2 pathes link. It gice the two pathes as string, dto separated, and 2 array
    /// for path elements (i.e. the string splitted by "."). This is motivated by perf considerations,
    /// to avoid splitting at different places.
    /// </summary>
    public interface IPathLink
    {
        /// <summary>
        /// Source path, dot separated (ex: Foo.Bar.x)
        /// </summary>
        string SourcePath { get; }

        /// <summary>
        /// Target path, dot separated (ex: Foo.Bar.x)
        /// </summary>
        string TargetPath { get; }

        /// <summary>
        /// Source path elements as an array
        /// </summary>
        string[] SourcePathElements { get; }

        /// <summary>
        /// Target path elements as an array
        /// </summary>
        string[] TargetPathElements { get; }

        ///<summary>
        /// Invert the path link
        ///</summary>
        ///<returns></returns>
        IPathLink Reverse();
    }
}
